package com.bjpowernode.crm.workbench.service;

import com.bjpowernode.crm.workbench.domain.ActivityRemark;
import com.bjpowernode.crm.workbench.mapper.ActivityRemarkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName:ActivityRemarkServiceImpl
 * Package:com.bjpowernode.crm.workbench.service
 * Date:2022/6/12 12:27
 * Description:
 * Author:zsm@zhangshuming.com
 */
@Service
public class ActivityRemarkServiceImpl implements ActivityRemarkService {
    @Autowired
    ActivityRemarkMapper activityRemarkMapper;
    @Override
    public List<ActivityRemark> queryActivityRemarkListByActivityId(String activity) {
        return activityRemarkMapper.selectActivityRemarkById(activity);
    }

    @Override
    public void saveCreateRemark(ActivityRemark activityRemark) {
        activityRemarkMapper.insertSelective(activityRemark);
    }

    @Override
    public void saveEditRemark(ActivityRemark activityRemark) {
        activityRemarkMapper.updateByPrimaryKeySelective(activityRemark);
    }

    @Override
    public void deleteRemarkById(String remarkId) {
        activityRemarkMapper.deleteByPrimaryKey(remarkId);
    }
}
